package com.example.workshop.lesson12;

import jdk.jfr.Name;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

import javax.inject.Inject;
import javax.inject.Named;

@Component
@Named
public class RecommenderImplementation {
   @Inject
   @Qualifier("CF")
    private Filter filter;

    public String [] recommendMovies(String movie){
        //打印正在使用的接口名称
        System.out.println("打印正在使用的Filter是："+filter+"\n");

       String results[]= filter.getRecommendations("流浪地球");

       return results;
    }
    public Filter getFilter(){
        return filter;
    }
}
